from imports import *

# needs to be reworked as obstacle file is changing

class Obstacle(pygame.sprite.Sprite):
##    from imports import *
    def __init__(self, data):
        pygame.sprite.Sprite.__init__(self)
##        self.type = data[0] # brick.bmp
##        self.x = int(float(data[1])) # top left x
##        self.y = int(float(data[2])) # top left y
##        self.rect = Rect(self.x, self.y, 32, 32)
        self.type = 'derp'
#        print data
        self.x = int(float(data[0]))
        self.y = int(float(data[1]))
        self.xlength = int(32 * float(data[2]))
        self.ylength = int(32 * float(data[3]))
#        print self.x
        self.rect = pygame.Rect(self.x, self.y, self.xlength, self.ylength)
#        self.image = pygame.Surface((32, 32))
#        self.defaults = pos
#        self.rect = Rect(int(self.defaults[0]), int(self.defaults[1]), int(32*float(self.defaults[2])), int(32*float(self.defaults[3])))
#        self.onGround = False
    def update(self):
        pass
    def reset(self):
##        self.rect.top = int(self.defaults[1])
##        self.rect.left = int(self.defaults[0])
        self.rect.left = self.x
        self.rect.top = self.y
